﻿using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;

namespace LibraryProject.Model;

public class MongodbAccount {
    [BsonId]
    public ObjectId Id { get; set; } = ObjectId.Empty;

    [BsonElement("accountId")]
    public string AccountId { get; set; } = "";

    [BsonElement("data")]
    public string Data { get; set; } = "{...}";

    [BsonElement("count")]
    public int Count { get; set; } = 0;

    [BsonElement("isUpdated")]
    public int IsUpdated { get; set; } = 0;

    [BsonElement("operator")]
    public string Operator { get; set; } = "0";

    public override string ToString() {
        return System.Text.Json.JsonSerializer.Serialize(this);
    }
}